package com.dongdongshop.feignservice;

import com.dongdongshop.data.DataResult;
import com.dongdongshop.pojo.cart.Cart;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("SPRINGCLOUD-CART-SERVICE")
public interface CartFeignService {

    @PostMapping("/cart/save")
    void save(@RequestParam("cartList") String cartList, @RequestParam("username")String username);

    @PostMapping("/cart/deleteCartOrderItem")
    DataResult<List<Cart>> deleteCartOrderItem(@RequestBody List<Cart> cartsList, @RequestParam("itemId") Long itemId);
}
